<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<style type="text/css">
		.box{
			width: 200px;
			height: 200px;
			background: red url() 0 0 no-repeat;
		}

	</style>
	<script type="text/javascript">

		window.onload = function  () {
		 	
		 	box = document.getElementsByClassName('box');

		 	box[0].style.width="400px";

		 	width = window.getComputedStyle ? window.getComputedStyle(box[0],null).width : box[0].currentStyle.width; 



		 	// alert(box[0].id)

		 	imgs = document.getElementById('imgs');


		 	imgs.alt="这不是图片"; 


		 	xbs = imgs.getAttribute('xbs');

		 	imgs.setAttribute('xbs','学并辊晶是是是');

		 	// alert(xbs);


		 	box[0].innerHTML="<h1>学并思</h1>";


		 	alert(box[0].innerText);



		 	



		 }
	</script>
</head>
<body>
	<p class="box" id='box1111' name="xbs" style="width:200px;">学并思xxxxxx</p>
	<img src="./1.jpg" xbs="学并思" alt="这个是一个图片" id="imgs">
</body>
</html>